package com.itms.tool.data;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable
public class Topic {

	@DatabaseField(id = true)
	private int id;
	@DatabaseField
	private String name;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Override
	public int hashCode() {
		return 31 * id;
	}
	
	@Override
	public boolean equals(java.lang.Object o) {
		if (!(o instanceof Topic)) {
			return false;
		}
		return id == ((Topic)o).id;
	}

	@Override
	public String toString() {
		return "Topic[id=" + id + ",name=" + name + "]";
	}
	
}
